<div class="sysWebsites index">
	<h1><?php echo __('场馆列表');?></h1>
    <div class="bloc">
        <div class="title">
           <?php echo $this->element('admin/bread')?>
             <p><?php echo $this->Html->link(__('添加'), array('action' => 'add')); ?></p>
        </div>
        <div class="admin_view_table">
			<table cellpadding="0" cellspacing="0">
			 <thead>
				<tr>
					<th><?php echo $this->Paginator->sort('id','ID'); ?></th>
					<th><?php echo $this->Paginator->sort('sys_website_id','所属分站'); ?></th>
					<th><?php echo $this->Paginator->sort('sys_city_id','城市'); ?></th>
					<th><?php echo $this->Paginator->sort('sys_area_id','地区'); ?></th>
					<th><?php echo $this->Paginator->sort('title_cn','名称'); ?></th>
					<th style = 'width:120px'><?php echo $this->Paginator->sort('sys_photo_id','预览图'); ?></th>
					<th><?php echo $this->Paginator->sort('count_tickets',"票品数"); ?></th>
					<th><?php echo $this->Paginator->sort('sort',"排序"); ?></th>
					<th><?php echo $this->Paginator->sort('sort_top',"置顶"); ?></th>
					<th><?php echo $this->Paginator->sort('enable',"启用"); ?></th>
					<th class="actions">操作</th>
			</tr>
			</thead>
			<tbody>
			<?php foreach ($venues as $venue): ?>
			<tr>
				<td><?php echo h($venue['Venue']['id']); ?>&nbsp;</td>
				<td>
					<?php echo $venue['SysWebsite']['title']; ?>
				</td>
				<td>
					<?php echo $venue['SysCity']['name']; ?>
				</td>
				<td  style="text-align: left">
					<?php echo $venue['SysArea']['name']; ?>
				</td>
				<td style="text-align: left"><?php echo $venue['Venue']['title_cn']." ".($venue['Venue']['title_en']?('('.$venue['Venue']['title_en'].')'):''); ?>&nbsp;</td>
				<td>
					<?php 
						if ($venue['SysPhoto']['id']>0){
							$imgsrc = thumb($venue['SysPhoto']);
						}else{
							$imgsrc = 'Album.nopic.jpg';
						}
						echo $this->Html->image($imgsrc,array('style'=>'width:100px;height:100px'));
					 ?>
				</td>
				<td><?php echo h($venue['Venue']['count_tickets']); ?>&nbsp;</td>
				<td><?php echo h($venue['Venue']['sort']); ?>&nbsp;</td>
				<td><?php echo h($venue['Venue']['sort_top']); ?>&nbsp;</td>
				<td><?php echo h($venue['Venue']['enable']); ?>&nbsp;</td>
				<td class="action">
					<?php echo $this->Html->link(__('场馆展示'), array('admin'=>true,'controller'=>'VenueGalleries','action' => 'index', $venue['Venue']['id'])); ?>
					<?php echo $this->Html->link(__('座位模型'), array('admin'=>true,'plugin'=>'seat','controller'=>'ModelX','action' => 'index', $venue['Venue']['id'])); ?>
					<?php echo $this->Html->link(__('修改'), array('action' => 'edit', $venue['Venue']['id'])); ?>
					<?php //echo $this->Form->postLink(__('删除'), array('action' => 'delete', $venue['Venue']['id']), null, __('Are you sure you want to delete # %s?', $venue['Venue']['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</tbody>
		</table>
		</div>
        <div class="pv_page">
            <div>
                <?php
                    echo $this->Paginator->counter(array(
                        'format' => __(' 当前第{:page}页/共{:pages}页 , 当前显示{:start} 至 {:end}条记录')
                    ));
                ?>	
            </div>
            <div class="paging">
                <?php
                    echo $this->Paginator->prev('< ' . __('上一页'), array(), null, array('class' => 'prev disabled'));
                    echo $this->Paginator->numbers(array('separator' => ''));
                    echo $this->Paginator->next(__('下一页') . ' >', array(), null, array('class' => 'next disabled'));
                ?>
            </div>
        </div>
    </div>
</div>